1. Field of the Invention
The present invention generally relates to journaled file systems in digital computers, and more specifically, to journaling of objects in a file system.
2. Description of the Related Art
A digital storage device in a computer system stores the operating system software, user applications and data files. One function of the operating system is to administer data storage in the storage device. A sub-system of the operating system, namely the file system, administers data storage in the storage device by allocating data to files and directories in response to appropriate requests by a system user or by an application.
Over time, files and directories are modified in different manners. For example, directories are created and named. Files are generated and deleted and the data in a file or in one of its attributes is modified. A link from a file or a directory to an existing directory or file may be added. To maintain a history of what activity has taken place within a digital storage device, a sub-system of the file system, namely the journal file system, keeps a current record, or journal, of directories and their contents.
A journal file system (JFS) is a file system in which the digital storage device maintains data integrity in the event of an operating system crash or if the operating system is otherwise halted abnormally. The JFS maintains a journal (also known as a journal receiver) of what activity has taken place within the data area of the digital storage device. If a system crash occurs, any lost data can be reconstructed from the information contained in the journal. Through keeping a journal, i.e., journaling, the JFS keeps a record of changes made to objects that are journaled and other events that occur in the system.
In one embodiment, an object, as used herein, may generally be considered a named storage space in a file system, which consists of a set of characteristics that describe itself, and in some cases, data. Some examples of objects are programs, files, libraries, access paths, and folders. Objects have a variety of types, such as, directory, stream file, symbolic link, socket, program, module, queue, and many more.
When an object is journaled, changes made to it are stored as journal entries to a journal. Each journal entry, therefore, contains a set of information regarding the change. For example, some journal entries identify activity for a specific database record. Others identify activity for a save, open, or close operation of an object. Each journal entry further contains information that identifies the source of the activity, including, for example, the user, the job, the program, the time and the date. The journal entries stored for a journaled object, therefore, reflect the changes made to that journaled object.
As shown above, journaling provides a user with many benefits, including the ability for the user to recover the changes made to an object that have occurred since the object was last saved. However, journaling increases disk activity on the computer system, consumes additional processing time for storing the data, and consumes additional volatile system memory, all of which adversely impact the computer system's performance. As the number of objects being journaled increases, the general performance of the computer system may decrease. Additionally, current journaling methods have a tendency to hold synchronization resources (i.e., locks, semaphores) for indefinite periods of time, which increases the wait time for other system resources to complete other system tasks.
A need, therefore, exists for an improved method, apparatus and system for journaling an object of a file system on a computer system.